package com.fw.service.file;

import org.springframework.transaction.annotation.Transactional;

import com.fw.service.bean.SearchCriteriaBean;
import com.fw.service.bean.SearchResultBean;
import com.fw.service.file.bean.FileBean;
import com.fw.service.file.bean.SearchFileBean;

public interface FileService {
    
    @Transactional
    public FileBean saveFile(String filename, String contentType, byte[] content, String description);
    
    @Transactional
    public FileBean saveFileAndGenerateFilename(String fileExtension, String contentType, byte[] content, String description);

    public FileBean getFile(Long id);
    
    @Transactional
    public Boolean deleteFile(Long id);

    public SearchResultBean<FileBean> searchFile(SearchCriteriaBean<SearchFileBean> searchCriteriaBean);

}
